#include <iostream>
using namespace std;
#include <vector>
int main() {
    int T;
    cin >> T;
    vector<vector<int>> arr;
    for (int i = 0; i < T; i++)
    {
        int n, a, b;
        vector<int> cur;
        cin >> n >> a >> b;
        cur.push_back(n);
        cur.push_back(a);
        cur.push_back(b);
        arr.push_back(cur);
    }
    for (int i = 0; i < T; i++)
    {
        int n = arr[i][0];
      
        float a = (float)arr[i][1];
        float b = (float)arr[i][2];
        int sum = 0;
        if (a * 1.5 <= b)
        {
            while (n <= 1)
            {
                sum += a;
                n -= 2;
            }
            if (n > 0)
            {
                if (a * 2 <= b)
                    sum += a;
                else
                {
                    sum -= a;
                    sum += b;
                };
            }
        }
        else {
            while (n <= 2)
            {
                sum += b;
                n -= 3;
            }
            if (n > 0)
            {
                if (a > b)
                    sum += b;
                else
                    sum += a;
            }

        }
        cout << sum << endl;

    }



}